package com.huobao.yunying.adapters;

import java.util.List;

import com.huobao.yunying.entity.StoreSingDanData;
import com.huobao.yunying.entity.Storeordergoods;
import com.huobao.yunying.utils.ImageUtils;
import com.huobao.yunying.utils.SkipUtils;
import com.huobao.zhangying.R;

import android.content.Context;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageView;
import android.widget.TextView;
import joanzapata.android.BaseAdapterHelper;
import joanzapata.android.QuickAdapter;

public class Adapter_Store_Dingdan_item_item extends QuickAdapter<Storeordergoods> {

	private StoreSingDanData ssd;
	public Adapter_Store_Dingdan_item_item(Context context, StoreSingDanData ssd) {
		super(context, R.layout.item_item_store_dingdan_manager, ssd.ordergoods);
		this.ssd = ssd;
	}

	@Override
	protected void convert(BaseAdapterHelper arg0, final Storeordergoods arg1) {
		ImageView imgView = arg0.getView(R.id.imgView);
		TextView tv_goods_name = arg0.getView(R.id.tv_goods_name);
		TextView tv_price = arg0.getView(R.id.tv_price);
		ImageUtils.loadimg(imgView, arg1.goods_image);
		tv_goods_name.setText(arg1.goods_name);
		tv_price.setText("实付款："+ssd.order_amount+"(含运费："+ssd.shipping_fee+")");
		imgView.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				SkipUtils.seeDetail(context, arg1.goods_id, arg1.goods_image);
			}
		});
	}
	

}
